package com.basic.auth.service;



import com.basic.auth.dao.model.AuthFunc;
import com.basic.auth.domain.AuthFuncBo;
import com.basic.auth.domain.AuthSpecFuncBo;
import com.basic.auth.domain.AuthUserFuncBo;
import com.basic.common.result.WebResult;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 功能管理接口
 *
 * @author lpp
 * @version 1.0
 * @Date 2018/8/14 9:44
 */
public interface AuthFuncService {

    /**
     * 条件查询
     *
     * @param authFuncBo
     * @return java.util.List<com.nxin.middle.basic.auth.dao.model.AuthFunc>
     * @author lpp
     * @date 10:25 2019/4/8
     */
    List<AuthFunc> selFuncListByParam(AuthFuncBo authFuncBo);

    /**
     * 查询子功能集合（不包含自身）及是否可用
     *
     * @param authFuncBo
     * @return java.util.List<com.nxin.middle.basic.auth.dao.model.AuthFunc>
     * @author LPP
     * @date 11:06 2018/8/17
     */
    List<AuthFuncBo> selSubFuncList(AuthFuncBo authFuncBo);

    /**
     * 分页查询
     *
     * @param authFuncBo
     * @return com.nxin.etpojar.common.result.WebResult
     * @author Li Lei
     * @since 2018/12/14 9:27
     */
    WebResult selSubFuncPageList(AuthFuncBo authFuncBo);

    /**
     * 根据id查询功能信息
     *
     * @param id
     * @return com.nxin.middle.basic.auth.dao.model.AuthFunc
     * @author LPP
     * @date 18:31 2018/8/14
     */
    AuthFunc selAuthFuncById(Long id);

    /**
     * 根据id修改功能信息
     *
     * @return int
     * @author LPP
     * @date 18:28 2018/8/14
     */
    int updAuthFuncById(AuthFunc authFunc);

    /**
     * 根据主键删除
     *
     * @return int
     * @author LPP
     * @date 18:25 2018/8/14
     */
    int delAuthFuncById(Long id);

    /**
     * 添加功能信息
     *
     * @param authFunc
     * @return void
     * @author LPP
     * @date 17:42 2018/8/14
     */
    void addAuthFunc(AuthFunc authFunc);

    /**
     * 根据条件递归查询子孙功能集合，只有可用的
     *
     * @param authFuncBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthFuncBo>
     * @author zhaoshuai
     * @since 2019/4/19 10:51
     */
    List<AuthFuncBo> selSubFuncListByParam(AuthFuncBo authFuncBo);

    /**
     * 递归查询子孙功能集合
     *
     * @param authFuncBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthFuncBo>
     * @author zhaoshuai
     * @since 2019/4/22 15:38
     */
    List<AuthFuncBo> selSubList(AuthFuncBo authFuncBo);

    /**
     * 查询用户功能权限
     *
     * @param authFuncBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthUserFuncBo>
     * @author zhaoshuai
     * @since 2019/4/22 13:48
     */
    List<AuthUserFuncBo> selAuthFuncByParam(AuthFuncBo authFuncBo);

    /**
     * 后台角色管理查询所有权限
     *
     * @param funcBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthFuncBo>
     * @author lpp
     * @date 15:15 2019/6/25
     */
    List<AuthFuncBo> selHtAndOrtherFuncList(AuthFuncBo funcBo);

    /**
     * 根据code查询用户是否有该模块权限
     *
     * @param funcBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthFuncBo>
     * @author wangxiaoshuai
     * @date 15:15 2019/6/25
     */
    Boolean judgeUserFuncByCode(AuthFuncBo funcBo);

    /**
     * 特殊模式下查询功能列表，主要用于权限管理非本子系统下的功能
     *
     * @param funcBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthFuncBo>
     * @author LS
     * @date 17:55 2020/4/18
     */
    List<AuthFuncBo> selSpecAuthFuncList(AuthSpecFuncBo funcBo);

    List<AuthFuncBo> selectAuthAll(AuthFuncBo authFuncBo);

    PageInfo selectAuthAllByPage(AuthFuncBo bo);
}
